<form action="" class="form-horizontal" role="form">	
	<div class="form-group">
		<label class="col-sm-1 control-label">网站顶部轮播图</label>
		<div class="col-sm-6">
			<textarea type="text" id="slide" name="data" readonly="readonly" class="form-control" rows="5"></textarea>
			<span class="label label-info">上传图片不能超过200KB，图片建议尺寸300×150像素</span>
			<input type="file" name="file_upload" id="image_upload" />
		</div>
	</div>
	
	<div class="form-group">
		<div class="col-sm-offset-1 col-sm-8">
			<button type="submit" class="btn btn-primary submit" data-loading-txt="提交中，请稍后……" data-ajax-url="__CONTROLLER__/indexPost">保存更改</button>
		</div>
	</div>
</form>

<section id="images-priview">
	
</section>

<!-- uploadify -->
<link rel="stylesheet" href="__PUBLIC__/Style/Common/uploadify/uploadify.css">
<script type="text/javascript" src="__PUBLIC__/Style/Common/uploadify/jquery.uploadify.min.js?{:rand(0,9999)}"></script>
<script type="text/javascript">
$(function() {
	
	$("#images-priview").uploadImagesPreview({
		data: {$moduleSlide.dataJSON} || [],
		insertContent: $("#slide"),
		type: "array"
	});
	
    
	$("#image_upload").uploadify({
        'multi'			:	true,
        'buttonClass'	:	'margin-top',
        'fileSizeLimit' : 	'200kb',
        'buttonText'	:	'选择图片',
        'fileTypeDesc' 	: 	'Image Files',
        'fileTypeExts' 	: 	'*.jpg; *.png',
        'swf'			: 	'__PUBLIC__/Style/Common/uploadify/uploadify.swf',
        'uploader'		: 	'__CONTROLLER__/upload',
        'onUploadSuccess'	: function(data, res){
        	var url = eval("(" + res + ")").extra.url;
        	$("#images-priview").addImageData(url.split(' '));
        }
    });
});
</script>